home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / list_all.var < prev    next >
Text File  |  1995-03-23  |  3KB  |  69 lines

  1. Article 3053 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!sol.UVic.CA!student!mwarburt
  3. From: mwarburt@student.UVic.CA (Mark "!" Warburton)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: Recursive VARS
  6. Summary: List of all variables in your HP-48sx
  7. Message-ID: <1990Dec24.011147.28080@sol.UVic.CA>
  8. Date: 24 Dec 90 01:11:47 GMT
  9. Sender: news@sol.UVic.CA
  10. Distribution: comp.sys.handhelds
  11. Organization: University of Victoria, Victoria, BC, Canada
  12. Lines: 52
  13. Nntp-Posting-Host: student.uvic.ca
  14.  
  15. Here is a program I whipped up which will hunt through the VAR directories
  16. of your HP-48sx and will return a list containing every "name" which it finds.
  17. Like the built-in VARS command, it returns everything which would show up in
  18. the var menu.  Unlike the VARS command, it is not limited to the names in
  19. the current directory.  Instead, it finds the names in ALL directories.
  20.  
  21. Since the program uses recursion to traverse the tree structure of the 
  22. directories, it is important that it be named with the same name it uses
  23. to "call itself".  I called it TREE, but if you have a more meaningful name
  24. for it, be sure to change the TREE command within the program itself.
  25.  
  26. The program may not seem very useful, but it is interesting to see just how
  27. many vars you have in your little wonder-box.  The program can be easily
  28. modified to do some handy housekeeping tasks, such as PURGEing all of the
  29. PPARS in all directories of the calculator. (I plan to set an alarm, so my
  30. HP turns on at 4:00 am each morning, erases all PPARS, and then quietly turns
  31. itself off again...)  If you don't know how to modify this program to do this,
  32. just send me mail, and I will send you the slightly modified version.
  33.  
  34.                 Mark Warburton
  35.                 Electrical Engineering
  36.                 University of Victoria, BC, Canada.
  37.  
  38. P.S.    Has anybody figured out a way to use the HP-48sx as an infra-red
  39.     remote-controller?  I am very interested in that.
  40.  
  41. Well, here's the program:
  42.  
  43. TREE:  # 671h    178.5 bytes
  44. -------------------------------------------------------------------------------
  45. %%HP: T(3)A(D)F(.);    @ This program will return a list of ALL variables
  46. \<< VARS 1        @ in your HP-48sx.  It does so by recursively
  47.   DO GETI DUP DEPTH    @ searching each directory.  The list it returns
  48. ROLLD            @ is in the same format as the list returned by the
  49.     IF DUP RCL DUP    @ "VARS" command.
  50. TYPE 15 == SWAP        @
  51. BYTES SWAP DROP 6.5    @ Be sure to put this program in the HOME directory.
  52. > AND
  53.     THEN EVAL TREE    @ Change TREE to whatever you name this program.
  54. UPDIR
  55.     ELSE DROP
  56.     END
  57.   UNTIL DUP 1 ==
  58.   END DROP DROP
  59.   IF PATH { HOME }
  60. ==
  61.   THEN { }
  62.     WHILE DEPTH 1 \=/
  63.     REPEAT SWAP +
  64.     END
  65.   END
  66. \>>
  67.  
  68.  
  69.